package com.example.function.integration.schedul;

import com.alibaba.fastjson2.util.DateUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Slf4j
@Component
public class SchedulTask {

    /**
     * 1分钟执行一次
     */
    @Scheduled(fixedDelay = 60000)
    public void getIndexData() {
        log.info("定时任务开始执行,{}", DateUtils.toString(new Date()));
    }
}
